Fixed a bug causing file uploads to fail
Fixed #34 (the image file stays locked)