Fix decode bug, and change body_replace to re replace

If img url contains Chinese, it will throw exception. It seems that img is already a unicode object, so I change img.decode() to img.encode().

```python
urlretrieve(urljoin(data['header']['link'],
			img.encode('utf-8')),
		   get_attachment_path(img, i['uid']))
```
After moidified, it works on Linux.

And I think body_replace will be better if use re.
I use WP-Syntax to highlight, and WP-Syntax use `<pre lang=""></pre>` to block code.
If I don't use re, I can't migrate the syntax highlight.

```python
for key in body_replace:
    # body = body.replace(key, body_replace[key])
    body = re.sub(key, body_replace[key], body)

```

And in config.yaml I can do re replace.
```
body_replace: {
  '<pre.*?lang="(.*?)".*?>': '\n{% codeblock \1 lang:\1 %}\n',
  '<pre.*?>': '\n{% codeblock %}\n',
  '</pre>': '\n{% endcodeblock %}\n',

#    '[python]': '{% codeblock lang:python %}',
#    '[/python]': '{% endcodeblock %}',
}
```