try to guess whether the session is headless or not, if it isn't don't try to open a browser
Merge pull request #127 from autopulated/headless-detection

Headless detection