Use path.basename for getting the last portion of path