Added build image functionality to rakefile