Sourcemap support in buffered mode

Should take care of #3 and possibly #21