updated this shell script to be more efficient in creating .eps and .pdf files.
updated to automatically know which artifacts to put into .eps files; pdfname is given without having to change function each time