Detect whether to open or replace on drag-drop based on first 4 bytes of file