Minor improvements to hash command, fix hash wildcarding with directories