Changed sys.path.append calls to be more robust