fixed minor bug in directory walker js
FIXED bug: cannot handle top-level element with same name as document
parameterized output directory with PL name
removed extraneous print statements (probably should remove more)