Features/fileoutput folderperm fix

Resolves #315.