bring plx tool up to date
remove dependency on Cwd in main.pl