Fix getCurrent to work with folder and files with '.' in his names.