Allow a little more flexibility - if getpwuid fails, just use the return from getuid to define the session directory

cmr=v1.7.5:reviewer=jsquyres
Properly set num_procs when np is not given, but cpus-per-proc is used. Thanks to Tetsuya Mishima for pointing it out

cmr=v1.7.4:reviewer=jsquyres