21 improve scan serial output for linux

@deadprogram Yes, but I think I'll do that in the PR for the scan serial for Mac since I'll reuse some parts of that code, what you think?