Fix test for exception on unwritable directory

Fixed the test based on feed back from @HermanPeeren #3