refs: https://github.com/TryGhost/Toolbox/issues/146
- this makes it much easier to stub this behaviour in tests - also makes more sense
- this logic is a dependency rather than part of the server code - moved it out ready to be moved elsewhere, doesn't need to be here