Update TemporaryFolder.newFolder() to give a better error message if a path contains a slash

Please review the fix and let me know if it does good.
This line should be placed before the `thrown.expect...` calls, because the exception must be thrown by `tempFolder.newFolder`.