Documented env var checking and fixed a bug in the p4a_dir check