MDL-38009 behat: Reset cachedir and tempdir