allow pushStrings to work with 'app' as package, not just file

fix #2749, and add test to keep it from breaking
also fix tryNTimes, I think it was vacuously succeeding all the time
(cc @sebv)