Add updated run_analysis code with improved paths