Fix bug that rename may cause crash (issue #22)

When the file name is less than 3 characters, rename it will cause crash.