Don't end JSON snippets with new lines

Also moved the phpunit tests to a location which is
in line with *all* other repo tests.

Together with https://gerrit.wikimedia.org/r/148094 this
makes sure that the json dumps of Wikidata follow a clean
and consistent scheme (one entity per line, each line ends
on a comma).

Change-Id: Iddc68052f290ce3973735e118739acac0d4d8a24
Merge "Don't end JSON snippets with new lines"