upload_image.sh should handle file URLs

upload_image.sh doesn't handle correctly file URLs: a file URL works only
if the file is already in the cache.
This patch provides support for file URLs of local files (RFC 1738)
http://tools.ietf.org/html/rfc1738

Change-Id: I107299c543cfa189e32848c32eefdbeb51a5e1f5
Closes-Bug: #1251752
Merge "upload_image.sh should handle file URLs"