todo done
Add file write to write nested file

* Creates dirs if necessary
Use new files.write()
Use files.write()
Make deleteEmptyDirs check for dir status first
mv files.deleteEmptyDirs -> rmEmptyDirs
mv checkout -> workingCopy
mv workingCopy.writeWorkingCopy -> write
Split out wc empty dir removal fn