init.sh: misc changes

Save and restore $PATH
Use major-minor number to check if mmc is initialized