test image permission

This change returns an error message if the stated directory in the tests and the current directory are both unable to be written to during image creation for testing