Fix appdir detection failure.

It fail if the application class name is "MyApp::Web".
Otherwise, if that is "MyApp", it succeed.