Fix test case not to assume it can write in the current directory