Fixed opening of file in different directory.