Not really an issue with the code if your folders are not being created I would think. It sounds like a very familiar thing.
I would suspect maybe safe mode is on on the server that would explain why directories are not created or your server paths are wrong. That is where I would start at.
Make sure permissions on your uploads and data folders are 777 permissions recursively then try creating a new category is the directory and all subdirectories created? if safe mode is off they should be.