'Check that a file at path exists.'

def assertFileExists(self, path):

    try:
        open(path)
    except IOError:
        path_dir = os.path.dirname(path)
        msg = ['File    does    not    exist:    {0}'.format(path), 'The    following    files    *did*    exist    in    {0}:    {1}'.format(path_dir, os.listdir(path_dir))]
        self.fail('\n'.join(msg))
