file notifications: ensure shutdown observer is added correctly

(integrated from master branch change 66ef9f2 by Todd Whiteman <toddw@activestate.com>)