more file io refactoring

Removes more references to static working directory.

@osa1 @radumereuta Please review
Explain in a few lines the process of this entire file.
Mainly, why do I need a provided ProcessBuilder, and I can't use a new one?