Miscellaneous fixes to kernelspec system