### Bug description

When exporting to PDF, and `keep-tex: true` and `output-dir: "outdir"` are both set in the relevant YAML, the `.tex` file remains in the working directory, even after the `.pdf` file is moved to `outdir`. 

## Reprex

1. Create a new Quarto project, with the following contents in  the `_quarto.yml` file:
    ```
    project:
      title: "test"
      output-dir: "outdir"
    ```
2. Create a `test.qmd` file with the following contents:
    ```
    ---
    title: "test"
    format:
      pdf:
        keep-tex: true
    ---
    
    Hello
    ```
3. Render the project. Observe that `test.pdf` is in the `outdir` subdirectory, but `test.tex` remains in the project directory. 

## System Stats

Results of `quarto check`: 
```
[✓] Checking Quarto installation......OK
      Version: 0.9.637
      Path: /Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.9.6 (Conda)
      Path: /Users/connor/opt/miniforge/bin/python
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with conda install jupyter

[✓] Checking R installation...........OK
      Version: 4.2.1
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library
      rmarkdown: 2.14

[✓] Checking Knitr engine render......OK
```

RStudio Version `2022.02.3 Build 492`. Session Info: 
```
R version 4.2.1 (2022-06-23)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.4

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.2.1 tools_4.2.1   
```

### Checklist

- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] included a minimal, self-contained, and reproducible example?
- [X] documented the quarto version you're running, by providing the output produced by `quarto check` in a terminal in your issue?
- [X] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
2022-07-06T02:25:10Z
connorp
bug
Future
open
TeX file is not moved to output-dir
https://github.com/quarto-dev/quarto-cli/issues/1294