Move image path manipulation to server side

This pull request moves the path manipulation for images to the server side.  It also removes the UploadFileThread class in favor of using the more general UploadFilesThread class.