Fixing #14778 - When mount is True we need to ensure the directory exists