Use basename for man argument

This protects from providing paths to man, like `./a.out`.