Fix apachedex wrapper
apachedex wrapper did not split shell arguments properly, making it impossible to pass arguments like --foo --bar="hehe hoho".
At the same time do some cleanup of argparse and subprocess usage, remove unused imports and if __name__ == '__main__' not working because sys not being imported.