Added error code
Use Imagick instead of fileinfo to identify the mime type of the image
Updated scenario
Updated test case
Use a timeout when trying to connect to the built in httpd instead of using sleep