Addition of a test folder for the plugin internals

Since we would like to test some things from the plugin
internals, we cannot use the tests/ project, as this one
is compilated using the plugin itself.

We decided to create a test folder specifically for the internals
of the plugin.
Wrong order in BFS corrected

When adding a list of children to the BFS list,
this one wasn't reverted, as required for the tree
reconstruction. Now corrected.