CORE-5412: Fixed the apply-input-metadata function in porklock to allow
directories.