Fixes #157

Add better error handling when compilation fails. If directory
is not deleted after failed compilation, inform user.
Improve debugging messages
Merge pull request #158 from pcmanus/recompile

Fixes #157