Add support for specifying a target filename via '-o'. Can still specify a target directory by appending a trailing slash to indicate it is a directory.