scripts: added pre-commit hook for removing trailing whitespaces