Wrong usage of dirname

According to documetation: dirname — Returns parent directory\'s path.
This means that after connecting the script landed to the wrong directoy.

This commnit fixes that and adds check to make sure paths add in slash /.

Signed-off-by: Baki Goxhaj <banago@gmail.com>
Added pwd method and added returns to several methods.
File/Directory Exists method impelemnted
Fix pwd on exists method
Merge pull request #1 from banago/master

Thanks @banago for your contribution! Nice to hear that you found this script useful.