fix sorting issue with line number nil

A sorting exception occurs when sorting two lints on one file where one lint has
line number 'nil' and the other one not. This commit fixes the issue by
treating 'nil' line numbers as 0.