Fix image upload error with local_flat image-store method.

local_flat still using some hierarchy for jpeg, preview, and sample images,
Create those folders automatically.

And remove file_hierarchy prefix for jpeg_path,
since it's not supposed to be used in local_flat

--HG--
extra : rebase_source : 5c6ebd49e885b3b7f54a1c58af498fcac5a271bc