Ported run_analysis to Linux