allow pushStrings to work with 'app' as package, not just file
fix #2749 and add tests
also fix tryNTimes, I think it was vacuously succeeding all the time
(cc @sebv)