Moved the writing of the short and .RD files above the zip file.  R complained it couldn't find them.