memoize cwd; installation subdirs should be first paths to be searched

Two simple enhancements:
 * memoize the calls to cwd() in order to improve performance (LaTeXML doesn't have any invocation of chdir() so it keeps its current directory throughout the runtime)
 * make sure the installation directory is the first to be examined, in order to always prefer them.

I am now starting to doubt the second enhancement, as it would mean that an author can never supply a binding of the same name as an existing binding in the installation directory. That seems like a bad idea. I need to recall where it was that I found this change essential... it's probably the wrong solution to whatever problem I had.