def _remove_temp_files(dirname):
    """
    Remove the created mat files in the user's temp folder
    """
    import os
    import glob
    for fname in glob.glob(os.path.join(dirname, 'tmp*.mat')):
        try:
            os.remove(fname)
        except OSError:
            pass
