Fixed post-commit to allow directories