Handle paths with spaces correctly
Add buffer_resize(...) function