Fixed "file already exist" optimization in File::transform()

* Previously, the resulting thumbnail did not handle hasFile() and
  stream() properly. This effected doCachedWork() in thumb.php

Change-Id: I8fd025204b5b41472be6c09924892fe8ee9dd260
Merge "Fixed "file already exist" optimization in File::transform()"