Added temp_dir check and read/write access checks
Merge pull request #1 from cmartin616/patch-2

Added temp_dir check and read/write access checks