'Given a "path" get the mount point of the filesystem containing
that path.'

def _get_mountpoint(self, path):

    code = ("import    os\npath    =    os.path.realpath(%r)\nwhile    path    !=    '/'    and    not    os.path.ismount(path):\n                path,    _    =    os.path.split(path)\nprint    path\n" % path)
    return self.run(('python    -c    "%s"' % code), stdout_tee=open(os.devnull, 'w')).stdout.rstrip()
