Don't show '//' when using path separator

Currently, the cwd segment is showing //etc when we are in /etc and / when we are in the root file.
This small patch fix this
Fix display for home directory
Add tests
Merge branch 'patch-1' into develop

Fixes #724