Remove old and duplicated logic in picking up the best artifact. It should be OK to try odex first and then oat. No need to check if parent directory is writable. Also move the art script in generating files in dalvik-cache, to simplify the --perf flow. Test: test.py Change-Id: I81df06e8f57b737dc57b4042cefe41413311bb5f