Change use of dirname() in register_user.php

Current use of dirname() in register_user.php does not allow it to be
copied and used in user plugin folder. Removed dirname() and used path
and folder constants instead.
Merge pull request #660 from JimBrown/1.4.6

Change use of dirname() in register_user.php