'Returns the [system temp dir]/tvdb_api-u501 (or
tvdb_api-myuser)'

def _getTempDir(self):

    if hasattr(os, 'getuid'):
        uid = ('u%d' % os.getuid())
    else:
        try:
            uid = getpass.getuser()
        except ImportError:
            return os.path.join(tempfile.gettempdir(), 'tvdb_api')
    return os.path.join(tempfile.gettempdir(), ('tvdb_api-%s' % uid))
