Files with relative paths can now be opened from command line

Closes #1109