Handle filename with up to 4 dots in it