Fixed image upload

Image upload widget in backend didn't work when hosting on the PHP
development server. Could be a bug in PHP itself (or rather, a
difference between the dev server and apache regarding how they fall
back to index.php for empty paths), but anyway, this should work.
Fixed #1070