and copy malayalam.sty in the created directory. After that you have to refresh the file name database:
Why not saving the file in /usr/local/texlive/2012? Because when a new release of TeX Live is issued, you would have to chase the old distribution for the files you have added in the meantime. This isn't necessary if one uses the texmf-local tree.