Update config setup to be friendlier when using Filemanager as part of another project

I'm primarily using Filemanager as an extension at work so I'm interested in seeing the front-end and back-end modularized, and being able to function independently of each other. Here are the main things I did to decouple them for my project.
1. The config file is shared between front-end and back-end so I moved it into a config/ folder for ease of management. 
2. Paths to Filemanager's internal files set by `__DIR__` to support having Filemanager root folder be in side another project's vendor/ folder. This makes it compatible to be dropped into another project, and follow many popular framework naming convention
3. The config file has options related to paths to different places broken off into its own JSON property for ease of reading.

The code so far has been focusing on the back-end. I will submit another pull request for front-end changes.
I've also done refactoring of the getfolder() to make it easier to read while I was studying the code as well.

Thank you for your work. I appreciate this project very much.
Merging config files is very useful for updates. For example, a new version can introduce a new config parameter - necessary for the FM to work correctly. Merging config files is an easy way to avoid the developer a manual config file update.

I would keep it as it is by default and would eventually prevent the config files merging operation by passing a variable into URL, something like  `userconfigOnly=true`.

This would allow performance for people who need it, and easy update for others. What do you think ?