If you use the Ubuntu install disc you can boot to rescue mode. Then you would need to move the folders using the mv
command:
mv /path/to/folder /path/to/original/location
Depending on how many folders you moved it might be easier to make a backup of your homedir and do a reinstall though.