Refactor project and platform services

We need this refactoring in order to reuse code for `iOSProjectService`
You can extract `pathToSave || npm.cache` to a variable as it is repeated twice in the function body.