I think passing in a directory is an user error. Why you think it is not ?