improve remake script
make check by default
re-run tests if any input or reference files changed
use perl symlink function in remake script