my 1st pull request

code wrapped in method, wrote right bin/bashim
changed encoding from iconv to String#Encode(in 1.9.3 iconv is depricated)