implement mk_analysis_dir and replace #!/usr/bin/python by #!/usr/bin/env python