tests: Check if workdir exists before trying to read