This function takes a string such as "Mary had a little lamb ." or "Mary had a little lamb ..." and removes the unecessary space to "Mary had a little lamb.".

rm_space_before_period(x)