Improved block device partition detection