Adding a common library js for shared javascript library.

Started to add common library for people to use.
This dir() is for simulate dir function in Python.