Test for multi/single linestrings directly

Test for multi/single linestrings directly; 

relying on try/except is the proper python way to handle this but OGR exceptions don't work reliably enough. 

When OGR raises an exception on a geometry operation, it is difficult to "recover" from. Any subsequent calls on that geometry continue to raise the RuntimeError which means the except block doesn't execute properly. This is purely an OGR problem and may be fixed in more recent versions - however, to maintain compatibility with our server OS and its older version of OGR, we need this fix.