Updated for CDH 5.2.

Also minor changes to user/directory creation.