Changed snake_case() to better handle abbreviations.

Updated snake_case() function to better handle cases like `FOOBar`, where it would turn it into `f_o_o_bar` instead of `foo_bar`. Also updated the test case.