Added more integration tests and added a hack to deal with spaces in files