Complete subdir support.

fixes #527
- Fix image upload in backend
- Use config.paths().webroot where necessary
Merge pull request #1726 from halfdan/527-utils