Updated version of spelunk.m

I've made various minor improvements to spelunk.m and am now trying to figure out how to work GitHub :-)