Fixed Method for writing image file from Base64 encoded String