Correctly ignore hidden directories