Use portable commands instead of libgen.h commands for path handling

Signed-off-by: Saggi Mizrahi <ficoos@gmail.com>
Merge pull request #119 from ficoos/remove_libgen

Use portable commands instead of libgen.h commands for path handling