it would be convenient for parsing conventions in filenames if there was an additional parameter to extname like basename of the form ", [ext]".
var fileName = "index.mobile.html";
path.extname(fileName) // ".html"
path.extname(fileName,".html") // ".mobile
This functionality should probably be implemented as a module instead of becoming part of core. I believe the powers at be want to keep core as minimal as possible.