Check for module before running a file
Merge pull request #315 from dlsniper/fix-312

Check for module before running a file (fixes #312)