Change AddFile to return its directory so calls can be chained and change test code to use it
Fix formatting
Stash changes