Detaching from Active Directory and keeping mobile accounts
There's a simpler way:


Log in as a different, admin, user.
Delete the account in question; select the option "Don't change the home folder"
Go to /Users and rename the home folder from username+deleted to the original, desired, short name.
Add a new local user with the same short name; you will be asked would you like to use the existing folder. Agree to this and it 'adopts' the previous folder, and fixes permissions. Nothing else to do.


Just tested this successfully on OS X 10.9