Replace posixpath with os.path and appropriate replace() calls
Better reporting of the position of an error