Fixes incorrect flag masks when opening syslog
Fixes syslog level extraction
Change the logic of opening syslog with the app_name.

On +Syslog.open(nil, ...)+ the app_name will be $0. This causes issues because
it might contain a path and be out of boundaries.

Here we're changing the logic a bit to use the first logged :app key or the
basename of $0. If you don't like that open the syslog yourself before using
Lines.