Path to directory should end with '/'

Path pointing to a directory should end with '/'. This allows a better
context when defining relative path in the config file or when passing
the path parameter. It's more obvious when the relative path doesn't
start with '/'.
Refactor getfolder()

Create new variable for storing results from function call for reuse.
The function shouldn't be calling the same function over and over.
breaking some long line of code to make it easier to read as well.
Fix config file to point to a folder inside project that can be used
as sample. Also switch the file path convention to be inline with the
previous commit for relative path without '/' at the beginning.