Get full path of argv[0] before we change directories. Make sure process names are long path names. Cleaned up initialisation a bit.