handle versioning better

an MDOC_VERSION file is created so we don't try to install the app
multiple times