sam-do: case insensitive extension check

Fix #276
bug fix: uninitialized value in exception message