ResourceHelper: fix removeExecutableLines function.