Skip comments before checking for control characters.

This patch moves the check for comment lines above the check for control characters. This allows comments with control characters, which e.g. happens when using tabs in comments.