refactor check_canchange into IkiWiki library