Added a timeout option

We noticed that the PhantomJS process was sometime inexplicably hanging.
This PR adds a timeout option (as long as you're using the path option).

I also added the following:
Immediately returning when the extension of the file is not supported.
Little more robust PhantomJS script.