Use string interpolation for HOMEBREW_PREFIX. Also, consider just putting this in the `File.open` block.