if os.path.exists(self.__patch_dir):
raise StackException, self.__patch_dir + ' already exists'
if os.path.exists(self.__refs_dir):
if os.path.exists(self.__patch_dir):
raise StackException, self.__patch_dir + ' already exists'
if os.path.exists(self.__refs_dir):