builtin/apply: make try_create_file() return -1 on error