title: Chart images fail to appear in Word document with RMarkdown when saving to a new location
body: <p>I am creating a complex RMarkdown document that includes some charts made in ggplot2. I run the following code:</p>
  
  <pre><code>rmarkdown::render(input="U:/John/R/aa_app/output/template.Rmd")
  </code></pre>
  
  <p>This creates a Word document called "template.docx" with no problem.</p>
  
  <p>However, I need to be able to specify a different file name and location for this document. So I run:</p>
  
  <pre><code>rmarkdown::render(input="U:/John/R/aa_app/output/template.Rmd",output_file="U:/John/R/aa_app/output/test.docx")
  </code></pre>
  
  <p>or</p>
  
  <pre><code>rmarkdown::render(input="U:/John/R/aa_app/output/template.Rmd",output_file="U:/John/R/aa_app/output/temp/test.docx")
  </code></pre>
  
  <p>In both cases, a Word document is created called "test.docx" but the charts are missing from the file. I get a series of error messages:</p>
  
  <pre><code>"C:/Program Files/RStudio/bin/pandoc/pandoc" template.utf8.md --to docx --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures
  --output U:/John/R/aa_app/output/test.docx --highlight-style tango   
  pandoc.exe: Could not find image `U:/John/R/aa_app/output/test_files/figure-docx/unnamed-chunk-3-1.png', skipping...  
  pandoc.exe: Could not find image `U:/John/R/aa_app/output/test_files/figure-docx/unnamed-chunk-3-2.png', skipping...  
  pandoc.exe: Could not find image `U:/John/R/aa_app/output/test_files/figure-docx/unnamed-chunk-4-1.png', skipping...  
  pandoc.exe: Could not find image `U:/John/R/aa_app/output/test_files/figure-docx/unnamed-chunk-7-1.png', skipping...  
  pandoc.exe: Could not find image `U:/John/R/aa_app/output/test_files/figure-docx/unnamed-chunk-8-1.png', skipping...  
  pandoc.exe: Could not find image `U:/John/R/aa_app/output/test_files/figure-docx/unnamed-chunk-8-2.png', skipping...  
  pandoc.exe: Could not find image `U:/John/R/aa_app/output/test_files/figure-docx/unnamed-chunk-8-3.png', skipping...  
  pandoc.exe: Could not find image `U:/John/R/aa_app/output/test_files/figure-docx/unnamed-chunk-8-4.png', skipping...
  </code></pre>
  
  <p>Does anyone know what is going wrong?</p>
  
  <p>UPDATE: Here is a reproducible example.</p>
  
  <p>Code for Repro.Rmd:</p>
  
  <pre><code>---
  title: "Repro"
  author: "John Butters"
  date: "Tuesday, April 28, 2015"
  output: word_document
  ---
  
  
  ```{r, echo=FALSE}
  plot(cars)
  ```
  </code></pre>
  
  <p>If I run the following code, a document is produced called "Repro.docx" that includes a plot of the "cars" dataset.</p>
  
  <pre><code>rmarkdown::render(input="U:/John/R/Repro.Rmd")
  </code></pre>
  
  <p>However, if I run the following code, a document is produced called "aaargh.docx" that does not include the plot, and I get the same pandoc error as above.</p>
  
  <pre><code>rmarkdown::render(input="U:/John/R/Repro.Rmd",output_file="U:/John/R/aaargh.docx")
  
  "C:/Program Files/RStudio/bin/pandoc/pandoc" Repro.utf8.md --to docx --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output U:/John/R/aaargh.docx --highlight-style tango 
  pandoc.exe: Could not find image `U:/John/R/aaargh_files/figure-docx/unnamed-chunk-1-1.png', skipping...
  </code></pre>