Moved linux command filter from shell to communicator

This fixes potential bugs where 'test' commands could return true when they should be returning false on Windows systems.