Fix 2 small bugs, conditionally install xvfb

Set HEADLESS to install xvfb, the X.org virtual frame buffer

PHANTOMJS and REQUIRED_RUBY environment variable tests were always true
http://stackoverflow.com/questions/3869072/test-for-non-zero-length-string-in-bash-n-var-or-var