cleaner process for matlab package tests (now compatible with ctest)