Index: utils/ccc
===================================================================
--- utils/ccc	(revision 46615)
+++ utils/ccc	(working copy)
@@ -11,36 +11,34 @@
 #
 ##===----------------------------------------------------------------------===##
 
+import os
 import sys
-import subprocess
 
 def error(message):
     print >> sys.stderr, 'ccc: ' + message
     sys.exit(1)
 
 def run(args):
-    print >> sys.stderr, ' '.join(args)
-    code = subprocess.call(args)
+    cmd = ' '.join(args)
+    print >> sys.stderr, cmd
+    code = os.system(cmd)
     if code:
         sys.exit(code)
 
 def preprocess(args):
-    command = 'clang -E'.split()
-    run(command + args)
+    run(['clang -E'] + args)
 
 def compile(args):
-    command = 'clang -emit-llvm-bc'.split()
-    run(command + args)
+    run(['clang -emit-llvm-bc'] + args)
 
 def link(args):
-    command = 'llvm-ld -native'.split()
-    run(command + args)
+    run(['llvm-ld -native'] + args)
 
 def extension(path):
-    return path.rpartition(".")[2]
+    return path.split(".")[-1]
 
 def changeextension(path, newext):
-    components = path.rpartition(".")
+    components = path.split(".")[-1]
     return "".join([components[0], components[1], newext])
 
 def inferlanguage(extension):
