Fixed proper creating of path for images

This will be careless about trailing slashes etc.