Writing to tmp for tests. Fixed cwd globbing issue.