[TIMOB-13908] Fixed several areas where config and session files are not...

... writable. Added isFileWritable() function to fs lib. Improvements to AppcException.