Don't check in the contract if the directory exists

In 24927735df73c9d7960f65302cc5b738b8cdd5e3 we return if a directory
doesn't exist, but it would throw at the contract check.