Added cnp_getExt, which gets the extension of a file.