Added writeFlash to Python, adjusted bash scripts for testing