Add 'executable' flag for Linux binaries
Fix all valgrind warnings.