Fixes curl_rewrite bug when trying to access a file which does not exist.
Adds coveralls service to travis using php-coveralls.