write custom Lua writer to input directory if writeable
Merge pull request #240 from rstudio/bugfix/ioslides-output-dir

Write custom Lua writer to input directory if writeable; output directory if not