clone of https://bitbucket.org/kardianos/osext