Refactor file creation via sudo into a single method
Merge branch 'devel' into v0.8-beta