Fix quoting issues when calculating hashes or recursing