Converted the plaintext exception template to PSR.
Modifications to the write method within the file utility.

If the file does not exists, it do not need to check if the file
is writable. The `isWritable`-method and `is_writable`-function
will return false if the file do not exists. Which will cause
issues with the cache handling, when the cache file do not exists.