Modify unit tests system

Move each file type into one directory (php, diff, out, expect, tpl)
Rewrite check.sh, in order to make more automatic the procedure