Removed unecessary functions

Refactored the code to just use `createDirectoryIfMissing` instead of binding `doesDirectoryExist` to `unless`. Achieves the same functionality in much less code.