Removes unnecessary slash from image dir