Allow BMScript dir to work on Windows and Linux -- fixes BYTEMAN-254
added extra fallback for obtaining pid on Windows  -- fixes BTEMAN-255

n.b many thanks very much to antoine vianey (antoine dot vianey at
gmail dot com) for contributing code for this fix