Fix dangling handle

Fixes https://github.com/adobe/brackets-shell/pull/435/files#r12126004
@RaymondLim