tests added. Implemented resolving npm module dir function