main: use api flag instead of defaul local flag
main: use api flag instead of defaul local flag

And fail fast whenever the given path does not exist.

henrywallace/mdpreview,henrywallace/mdpreview,henrywallace/mdpreview,henrywallace/mdpreview