Better mode check on keyringer_check_tmp (closes #30)