Cleanup application directory when the application is done.