Various bug fixes
Merge branch 'master' of github.com:Block8/PHPCI