Automatically produce EDA output, based on the environment where the script is running (plots in RStudio plot window, if running in RStudio, and SVG/PDF files, if running via Rscript CLI. This change is initially for one plot, but will be propagated across the rest of EDA source code. Also, minor code fixes.