I could not see any issue with the code you have. And since you said it works on your local server and then it must be a permission issue as you said.
When you insert an image, is the image being uploaded to the profilethumbs folder? Do you see the image there?