Fix directory check for patch folders