File path exception? + Error Checking

Clearly I have no idea what I'm doing, so I put the changes as comments.
Merge pull request #1 from celsor/patch-1

File path exception? + Error Checking