server.js: check existence of files, not directories

The directories exists, what does not exist is the specific
files for the libraries. Now it loads correctly the `npm` modules.