Add guard to get_last_n_months/3 to protect against crappy input.

Add clause to pattern when Month == 1 instead of using case
Add -spec