Implement JavaScript server-side require with unit tests.

Closes #111.