Trim wordfilter

Actions like registering may fail, if a wordfilter contains empty lines or if a line ends with a space.