I am having the exact same issue.
I followed the instructions below and the error changed to be a different file later in the install process. The edits that I had made to class-wp-upgrader.php had been blown away already by the installation process.
Is this really an issue with the WP Better Security plugin or is there a problem generally with the update process for 3.8.1?