Separate programDirectory and cwd, make readFully respect base.