Fixed proper creating of path for images