Add test for non-writeable directory.
Add new utils file.