use regular expressions to determine filename suffix
fixed a stupid bug
version 0.1.2