Rename test folder to match app

Correct the 'connector/' name to 'connectors' in the test folder. The
folder structure in 'tests/' now reflect the actual app.
Add tests for getvar() and postvar()

To make the function both more useful and testable, we're returning the
resulting value retrieved instead of boolean.
Merge from master