Based upon a patch from Otavio Salvador <otavio@ossystems.com.br>,
ensure the target json files are written in the correct order with
the most specific last incase it overwrites earlier files if the prefixes
match.
(From OE-Core rev: 1912c4e9e0ecf9655f3b3a41588b54d7956f5899)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>