remove trailing whitespace from source scripts and fix them to accept input filename containing whitespace.