Fixed nasty . and .. bug