Cleanup and reformating of the dirname and basename function.
Cleanup and reformating of the dirname and basename function.

gco/csync,meeh420/csync,meeh420/csync,gco/csync,gco/csync,meeh420/csync,gco/csync