Rewrite of the Filename class.

Im too lazy to discuss the reasons why did this. It's now just better
than ever.