Fix segfault by invalid margin value

If any of the values missing, it will result in segmentation fault, e.g.

```
-m 0
-m 0,1
```

Use `scanf` to help ensure the format is correct and prevent the segfault from happening.

By the way, there is no `--help`, I just copied the error message from scale's.