Removing dependency of realpath
Add path module
Better test structure