Move example from tests

Add the tests folder as Testcase, remove the example to appropriate
folder.
Use __DIR__ for real paths