Fixed problem when trying to write to the saved image directory and a HTTP 301 redirect issue with AndroidHttpClient