Fixed faulty logic in PFS, which prevented O_TRUNC from working right. Updated APA and PFS to have less legacy code.