better check for extension of .app/.src/.script