Fixes to profile enhancer and ScratchUserscript.getPageType()