Correct folder structure in tests and fix tests for php <5.4