[RFC] Don't try to detect extensions of directories when renaming

Don't know if it is the best to way to do it, but it is working. Solves #71.