path.split and path.join instead of '/'
Replace occurences of ""%() by "".format()