Adding target directory as an input argument-- the analysis and BAM files will be moved to this location after processing.  Also adding logging via tee.