setup.py updated to use internal methods
Few methods stolen from os path.