Eitherway, make sure to have these packages installed:
sane-utils
netpbm
*Actually. I don't even think you need GIMP. But it's good to have it installed anyway.
gimp
gimp-plugin-registry
gimp-resynthesizer

I copied his code and made modifications. For some weird reason his code didn't work out of the box for me so i had to modify it accordingly once i saw the original brother scripts. These are the scripts

These scripts can be found in directories residing inside /opt/scanner/..

Scantofile.sh

Scantoimage.sh

Credits to Ray!

EDIT:

So i still have my old laptop running linux but i recently needed the hard disk for something else and there's no hard disk in there. How about running linux off a thumbdrive? Sure! Just install ArchLinux onto it, install the packages and you're ready to go. I did however meet into some issues when i was trying to configure the Scantofile.sh script for mine. For some weird reason the pdf files just wouldn't convert properly and i was honestly too lazy to debug. So i just modified the Scantoimage.sh script and now we have a working Scantofile.sh script too. The script is below. The extra package you need is imagemagick.