Adding nodeunit and layer name parsing unit tests

Nodeunit is added to dev dependencies and tests are added in a separate
file.