adding ability to check system version; refs #3
refactoring code a bit
Merge pull request #3 from klieber/issue/3_detect_phantomjs

Add support for detecting an existing phantomjs installation.