Fixed bug when opening files with '#' in names.